/**
 * @file:   yuvConvert.h
 * @note:   2010-2020, <git.oschia.net/think3r>
 * @brief::  yuvConvert.c 的头文件
 * @author: think3r
 * @date    2018/7/2
 * @note:
 * @note \n History:
   1.日    期: 2018/7/2
     作    者: think3r
     修改历史: 创建文件
 */

/*----------------------------------------------*/
/*                  头文件包含                  */
/*----------------------------------------------*/

/*----------------------------------------------*/
/*                  宏类型定义                  */
/*----------------------------------------------*/

/*----------------------------------------------*/
/*                 结构体定义                   */
/*----------------------------------------------*/
typedef enum
{
    YUV_ERR_TYPE    = 0x00,     

    YUV_420_FORMATE = 0x10,
    YUV_420_I420    = 0x11,     /* [YYYYYYYY] [UU] [VV] */
    YUV_420_YV12    = 0x12,     /* [YYYYYYYY] [VV] [UU] */
    YUV_420_NV12    = 0x13,     /* [YYYYYYYY] [UVUV] */
    YUV_420_NV21    = 0x14,     /* [YYYYYYYY] [VUVU */

    YUV_422_FORMATE = 0x20,
    YUV_422_422P    = 0x21,     /* [YYYY] [UU] [VV] */
    YUV_422_422SP   = 0x22,     /* [YYYY] [UVUV] */
    YUV_422_UYVY    = 0x23,     /* [UYVY UYVY] */
    YUV_422_YUYV    = 0x24,     /* [YUYV YUYV] */

    YUV_444_FORMATE = 0x40,
    YUV_444_PLANAR  = 0x41,     /* [Y] [U] [V] */
    YUV_444_InterLeaved = 0x42, /* [YUV] */
    
}YUV_FORMATE;
/*----------------------------------------------*/
/*                  函数声明                    */
/*----------------------------------------------*/

/*----------------------------------------------*/
/*                  全局变量                    */
/*----------------------------------------------*/

/*----------------------------------------------*/
/*                  函数定义                    */
/*----------------------------------------------*/
#ifndef __YUVCONVERT_H__
#define __YUVCONVERT_H__


#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */

extern ERR GetFileSize(char * file_path, long * file_size);
extern ERR read_file(char *path, UCHAR *outbuf, UINT size);
extern ERR decodeInputFromate(char * strFromate, YUV_FORMATE * yuvFromate);

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */


#endif /* __YUVCONVERT_H__ */

